package com.example.myapplication;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class GridLayoutActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_grid_layout);

        Bundle bundle = getIntent().getExtras();

        if (bundle==null) {
            throw new IllegalArgumentException("没有给我传递参数");
        }

        Long id = bundle.getLong("id");

        String tips = bundle.getString("tips");

        TextView idView = findViewById(R.id.id);
        idView.setText(id.toString());

        TextView tipsView = findViewById(R.id.tips);

        tipsView.setText(tips);
    }
}